﻿<%@ Page language="c#" Inherits="sow.forumsmain" Codebehind="forumsmain.aspx.cs" AutoEventWireup="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>forums</title>
		<LINK href="../springofwater.css" type="text/css" rel="stylesheet">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body>
		<div align="center">
			<form id="Form1" method="post" runat="server">
				<div align="center">
					<table id="table811" width="80%" border="0">
						<tr>
							<td align="center">
								<% Server.Execute("header.aspx");%>
							</td>
						</tr>
					</table>
				</div>
				<div align="center">
					<table cellSpacing="0" cellPadding="0" width="770" align="center" border="0">
						<tr>
							<td>
								<ul style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: left; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 100%; PADDING-TOP: 0px; FONT-FAMILY: SimSun; LIST-STYLE-TYPE: none; BACKGROUND-COLOR: white">
									<li style="DISPLAY: inline">
										<A class="menu" href="index.aspx">泉源首页</A>
									<li style="DISPLAY: inline">
										<A class="selected" href="forumsmain.aspx">泉源论坛</A>
									<li style="DISPLAY: inline">
										<A class="menu" href="bloggermain.aspx">泉源博客</A>
									<li style="DISPLAY: inline">
										<A class="empty" href="jianzao.aspx"></A>
									<li style="DISPLAY: inline">
										<A class="menu" href="dengji.aspx">注册登记</A>
									<li style="DISPLAY: inline">
										<A class="menu" href="women.aspx">关于我们</A>
									<li style="DISPLAY: inline">
										<A class="menu" href="mailto:contact@springofwater.net">联络我们</A>
									</li>
								</ul>
							</td>
						</tr>
					</table>
				</div>
				<FONT face="???">
					<TABLE id="Table1" style="WIDTH: 771px; HEIGHT: 104px" borderColor="#6699cc" cellSpacing="0"
						cellPadding="0" bgColor="#f0f0f0" border="1">
						<TR>
							<td style="HEIGHT: 15px" colSpan="2">
								<TABLE id="Table2" style="WIDTH: 766px; HEIGHT: 16px" bgColor="#5d9dd1">
									<TR>
								<TD  align="center" bgColor="#5d9dd1" colSpan="1"
							rowSpan="1">&nbsp;
							<P class="size1"><A href="forumsStart.aspx?CategoryID=33&ForumID=11"><FONT color="#ffffff">综合论坛</FONT></A><FONT color="#ffffff">|
								</FONT><A href="forumsStart.aspx?CategoryID=48&ForumID=15"><FONT color="#ffffff">宣教论坛</FONT></A><FONT color="#ffffff">|
								</FONT><A href="forumsStart.aspx?CategoryID=53&ForumID=16"><FONT color="#ffffff">同工园地</FONT></A><FONT color="#ffffff">|
								</FONT><A href="bloggerweb.aspx?UserID=153"><FONT color="#ffffff">国内论坛</FONT></A><FONT color="#ffffff"/>
						          </TD>
										<TD vAlign="middle" align="right" colSpan="1" rowSpan="1"><asp:linkbutton id="newArticleButton" runat="server" Width="317px" BackColor="Transparent" ForeColor="White"
												Font-Size="x-Small" BorderStyle="None" onclick="newArticleButton_Click"></asp:linkbutton><FONT color="#009900"></FONT>
										</TD>
									</TR>
									<TR>
										<TD vAlign="middle" align="right"></TD>
									</TR>
								</TABLE>
								<asp:datalist id="DataList1" runat="server" Font-Size="X-Small">
									<ItemTemplate>
									     
										<A href='forumPostDetail.aspx?CategoryID=<%# System.Convert.ToString(DataBinder.Eval(Container.DataItem, "CategoryID")) %>&PostID=<%# System.Convert.ToString(DataBinder.Eval(Container.DataItem, "PostID")) %>&ForumID=<%=Request.QueryString["ForumID"] == null ? "11" : Request.QueryString["ForumID"]%>
																	' style=text-decoration:none><font color="blue">. <font color="purple"><置顶></font>&nbsp
												<%# DataBinder.Eval(Container.DataItem,"Subject") %>-
												<%# SpringWaterDataAccess.UserObject.getUserName(DataBinder.Eval(Container.DataItem,"UserID")) %>-
												<%# DataBinder.Eval(Container.DataItem,"CreateDate") %>-
												<%# DataBinder.Eval(Container.DataItem,"NumberOfVisits") %> reads
											</font></A>
									</ItemTemplate>
								</asp:datalist></td>
						</TR>
						
						<TR>
							<TD style="WIDTH: 100%" bgColor="whitesmoke">
                                <asp:GridView ID="PostGridView" runat="server" AllowPaging="True" AllowSorting="True"
                                    AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC" BorderStyle="None"
                                    BorderWidth="1px" CellPadding="4" DataKeyNames="PostID" DataSourceID="PostDataSource" OnSelectedIndexChanged="PostGridView_SelectedIndexChanged" Width="100%">
                                    <PagerSettings Position="TopAndBottom" />
                                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                                    <Columns>
                                        <asp:BoundField DataField="PostID" HeaderText="PostID" InsertVisible="False" ReadOnly="True"
                                            SortExpression="PostID" Visible="False" />
                                        <asp:HyperLinkField DataNavigateUrlFields="PostID" DataNavigateUrlFormatString="forumDetail.aspx?PostID={0}" DataTextField="Subject" HeaderText="标题" >
                                            <ItemStyle Width="50%" />
                                        </asp:HyperLinkField>
                                        <asp:BoundField DataField="ReplyCounts" HeaderText="回复" SortExpression="ReplyCounts" >
                                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Hits" HeaderText="查看" NullDisplayText="0" SortExpression="Hits" >
                                            <ItemStyle Width="40px" HorizontalAlign="Center" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="Name" HeaderText="发布者" >
                                            <ItemStyle Width="80px" HorizontalAlign="Center" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="CreateDate" HeaderText="发表时间" SortExpression="CreateDate" DataFormatString="{0:d}" >
                                            <ItemStyle Width="80px" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="LastUpdate" HeaderText="最新更新" SortExpression="LastUpdate" >
                                            <ItemStyle Width="80px" />
                                        </asp:BoundField>
                                    </Columns>
                                    <RowStyle BackColor="White" ForeColor="#003399" />
                                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" Font-Size="XX-Small" />
                                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                                </asp:GridView>
                                &nbsp;&nbsp;&nbsp;
                                <asp:ObjectDataSource ID="PostDataSource" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="GetData" TypeName="server.SOWDBTableAdapters.PostListTableAdapter">
                                </asp:ObjectDataSource>
                            </TD>
						</TR>
					</TABLE>
				</FONT>
			</form>
		</div>
		<DIV align="center">
            &nbsp;<table id="table81" width="80%" border="0">
				<tr>
					<td align="center">
						<% Server.Execute("tail.aspx");%>
					</td>
				</tr>
			</table>
		</DIV>
	</body>
</HTML>
